﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>SyntaxHighlighter Brushes Tests</title>
    <script type="text/javascript" src="js/jquery-1.4.2.js"></script>
    <!-- SyntaxHighlighter -->
    <script type="text/javascript" src="src/shCore.js"></script>
    <script type="text/javascript" src="src/shAutoloader.js"></script>
    <link type="text/css" rel="stylesheet" href="styles/shCore.css" />
    <link type="text/css" rel="Stylesheet" href="styles/shCoreDefault.css" />
    <link type="text/css" rel="Stylesheet" href="styles/shThemeDefault.css" />
</head>
<body>
    <div id="output">
    </div>
    <style type="text/css">
        body
        {
            background: white;
            font-family: Helvetica;
        }
        .test-wrap
        {
            width: 100%;
            height: 800px;
            overflow: auto;
            border: none;
        }
    </style>
    <script type="text/javascript">
        var brushes = ['Css', 'CSharp', 'JScript','PHP'];

        $(document).ready(function () {
            var html = '';

            $.each(brushes, function (index) {
                var name = this;

                html += ''
			         + '<div class="test-wrap">'
			         + '<h1>'
				         + '<a href="#theme' + (index + 1) + '">next</a> '
				         + '<a name="theme' + index + '">'
				         	+ name
				         + '</a>'
			         + '</h1>'
			         ;

                $.ajax({
                    url: 'brushes/' + name.toLowerCase() + '.html',
                    type: 'GET',
                    dataType: 'text',
                    async: false,
                    success: function (data) {
                        html += data;
                    },
                    error: function () {
                        html += '<p>Not found...</p>';
                    }
                });

                html += '</div>\n';

                if (index % 2 != 0)
                    html += '<div style="clear:both"></div>\n';
            });

            $('#output')[0].innerHTML = html;
            $('#output a[name]:first').attr('name', 'top');
            $('#output a[href]:last').attr('href', '#top').html('top');

            function path() {
                var args = arguments, result = [];
                for (var i = 0; i < args.length; i++)
                    result.push(args[i].replace('@', 'scripts/'));
                return result
            };

            SyntaxHighlighter.autoloader.apply(null, path(
                'applescript            @shBrushAppleScript.js',
                'actionscript3 as3      @shBrushAS3.js',
                'bash shell             @shBrushBash.js',
                'coldfusion cf          @shBrushColdFusion.js',
                'cpp c                  @shBrushCpp.js',
                'c# c-sharp csharp      @shBrushCSharp.js',
                'css                    @shBrushCss.js',
                'delphi pascal          @shBrushDelphi.js',
                'diff patch pas         @shBrushDiff.js',
                'erl erlang             @shBrushErlang.js',
                'groovy                 @shBrushGroovy.js',
                'java                   @shBrushJava.js',
                'jfx javafx             @shBrushJavaFX.js',
                'js jscript javascript  @shBrushJScript.js',
                'perl pl                @shBrushPerl.js',
                'php                    @shBrushPhp.js',
                'text plain             @shBrushPlain.js',
                'py python              @shBrushPython.js',
                'ruby rails ror rb      @shBrushRuby.js',
                'sass scss              @shBrushSass.js',
                'scala                  @shBrushScala.js',
                'sql                    @shBrushSql.js',
                'vb vbnet               @shBrushVb.js',
                'xml xhtml xslt html    @shBrushXml.js')
         );

            SyntaxHighlighter.all();
        });
    </script>
</body>
</html>
